<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no"/>
   	<meta http-equiv=”Page-Enter” content=”revealTrans(Duration=100.0,Transition=4)” />
    <title>云筑圈</title>
    
    <link rel="stylesheet" type="text/css" href="../../css/aui-win.css" />

    <style>
/*通用设置开始*/
.hasMsg{display:block;}
.noMsg{display:none;}
/*通用设置结束*/
/*slide*/
 .swipe {
        overflow: hidden;
        visibility: hidden;
        position: relative;
    }
    .swipe-wrap {
        overflow: hidden;
        position: relative;
        z-index: 6;
    }
    .swipe-wrap > figure {
    	height:130px;
        float: left;
        width: 100%;
        position: relative;
    }
    #slider {
        margin: 0px auto; /* 居中对齐 */
    }

    figure {
        margin: 0;/* 对齐，四周宽度都为0，在轮播的时候，以整张图片进行移动 */
    }
    .swipe-wrap img {
		height: 130px;
		width: 100%;
	}
    nav{
	    position: absolute;
		right: 10px;
		bottom: 12px;
		overflow: hidden;
    }
    #position {
        text-align: center;
        list-style: none;
        margin: 0;
        padding: 0
    }
    #position li {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #141414;
        margin: 0 2px;
        cursor: pointer
    }
    #position li.on {
        background-color: #1293dc;
    }
        /*中间内容开始*/
        .content h4{
            background: #f2f2f2;
            height: 40px;
            line-height: 40px;
            font-weight: 500;
        }
        .innerTitle{
            margin-left: 5%
        }
        .innerLink{
            position:absolute;
            right:2.5%;
        }
        .link{
            display: inline-block;
            width: 18%;
            padding: 5px 1%;
            background: #fff;
        }
        .content img{
            width:100%;
            height: auto;
        }
        #showTeamList,#showBusiOPPList,#showEbusiList{background:white;}
        
        /*中间内容结束*/
        /*底部CSS开始*/
*{
        margin:0;
        padding:0;
    }
    #footer {
            width:100%;
            position:fixed;
            bottom:0px;
            height:11%;
            background-color: #FAFAFA;
            border-top: 1px solid #FAFAFA;
            text-align:center;
        }
        #footer ul{
            height: 100%;
        }
        #footer li {
            height: 100%;
        }
        .bbtn01 {
            background: url(../../image/home/home2.png) no-repeat 50% 15%;
            background-size:27%;
        }
        .bbtn02 {
            background: url(../../image/home/quan1.png) no-repeat 50% 15%;
            background-size:27%;
        }
        .bbtn03 {
            background: url(../../image/home/me2.png) no-repeat 50% 15%;
            background-size:27%;
        }
        .bottom_btn {
            height:100%;
            display:block;
            position: relative;
        }
        .bottom_btn span{
            width: 100%;
            display:block;
            position:absolute;
            bottom: 2%;
            text-align: center;
            font-family:"微软雅黑";
        }
          #footer li{
            width: 33.33333%;
            float: left;
            height: 100%;
        }

    @media screen and (min-height: 650px) {
            #username{
                margin-top: 5% !important;
                font-size:25px;
            }
            .bbtn01 {
                background: url(../../image/home/home2.png) no-repeat 50% 30%;
                background-size:27%;
            }
            .bbtn02 {
                background: url(../../image/home/quan1.png) no-repeat 50% 30%;
                background-size:27%;
            }
            .bbtn03 {
                background: url(../../image/home/me2.png) no-repeat 50% 30%;
                background-size:27%;
            }
            .bottom_btn span{
                bottom: 5%;
            }
        }
        
    </style>
</head>
<body>
	<div id="tanChu1">
		<p>数据请求失败！</p>
		<input type="button" value="确定" id="tanChu_btn1">
	</div>
    <header class="aui-bar aui-bar-nav aui-bar-yunzo" id="aui-header">
		<div class="aui-title" id="partName">
			云筑科技
		</div>
	</header>
    <div id="contentWrap">
        <!-- 顶部轮播图 -->
        <div id="slider" class="swipe" style="visibility:visible;">
		    <div class="swipe-wrap">
		    </div>
		    <nav>
			    <ul id="position">
			        <li class="on"></li>
			        <li class=""></li>
			        <li class=""></li>
			    </ul>
			</nav>
		</div>
		<!--顶部轮播图结束-->
		<!--中间内容开始-->
        <div class="content">
            <div class="findTeam">
                <h4>
                    <span class="innerTitle" >找团体</span>
                    <a class="innerLink" onclick="openWin('group_header')" >全国&gt;&gt;</a>
                </h4>
                <div id="showTeamList">
                	<div class="noMsg">
	                    <a class="link">
	                        <img src="../../image/home/ecinfo/1.png">
	                    </a
	                    ><a class="link">
	                        <img src="../../image/home/ecinfo/2.png">
	                    </a
	                    ><a class="link">
	                        <img src="../../image/home/ecinfo/3.png">
	                    </a
	                    ><a class="link">
	                        <img src="../../image/home/ecinfo/4.png">
	                    </a
	                    ><a class="link">
	                        <img src="../../image/home/ecinfo/5.png">
	                    </a>
                    </div>
                </div>
            </div>
            <div class="findBusiOpp">
                <h4>
                    <span class="innerTitle" >找商机</span>
                    <a class="innerLink" onclick="openpageparam('../second_frame/group_select.html')" >全国&gt;&gt;</a>
                </h4>
                <div id="showBusiOPPList">
                	<div class="noMsg">
                    <a class="link">
                        <img src="../../image/home/ecinfo/6.png">
                    </a
                            ><a class="link">
                    <img src="../../image/home/ecinfo/7.png">
                    </a
                        ><a class="link">
                    <img src="../../image/home/ecinfo/8.png">
                    </a
                        ><a class="link">
                    <img src="../../image/home/ecinfo/9.png">
                    </a
                        ><a class="link">
                    <img src="../../image/home/ecinfo/10.png">
                </a>
                </div>
                </div>
            </div>
            <div class="findEbusi">
                <h4>
                    <span class="innerTitle" >找电商</span>
                    <a class="innerLink" onclick="openWin('group_header')" >全国&gt;&gt;</a>
                </h4>
                <div id="showEbusiList">
                	<div class="noMsg"></div>
                    <a class="link">
                        <img src="../../image/home/ecinfo/hotel1.png">
                    </a
                            ><a class="link">
                    <img src="../../image/home/ecinfo/hotel2.png">
                </a
                        ><a class="link">
                    <img src="../../image/home/ecinfo/hotel3.png">
                </a
                        ><a class="link">
                    <img src="../../image/home/ecinfo/hotel4.png">
                </a
                        ><a class="link">
                    <img src="../../image/home/ecinfo/hotel1.png">
                </a>
                </div>
                </div>
            </div>
            <!--以下为遮罩DIV-->
            <div class="coverDiv noMsg" onclick="showWarn()"></div>
        </div>
        <!--中间内容结束-->


   	</div>
    <div id="footer">
        <ul>
            <li tapmode="activebtn0 activebtn" onclick="openNewFrame('../main')">
                <a class="bottom_btn bbtn01 weixin"><span style="color:#4d4d4d;">首页</span></a>
            </li>
            <li tapmode="activebtn1 activebtn" onclick="openNewFrame('yunzoquan')">
                <a class="bottom_btn bbtn02 communicate activebtn activebtn1"><span style="color:#FF7419;">云筑圈</span></a>
            </li>
            <li tapmode="activebtn3 activebtn" onclick="openNewFrame('../third_frame/mine')">
                <a class="bottom_btn bbtn03 home"><span style="color:#4d4d4d;">我的</span></a>
            </li>
        </ul>
    </div>
    <!--加载loading功能-->
    <div id="loadIng_startStop" style="width: 100%;height: 100%;position: absolute;z-index: 1000;display: none;">
        <img src="../../image/my/loading_more.gif" style="width: 20%;position: absolute;left: 50%;margin-left: -10%;top:50%;margin-top: -10%;">
    </div>
    <script type="text/javascript" src="../../script/jquery-1.10.2.min.js"></script>
  	<script src="../../script/common.js"></script>
	<script src="../../script/swipe.js"></script>
    <script>
    $(document).ready(function(){
    	getaAd();
    });
        /*ty新增2015-11-19*/
        function showWarn() {
            confirm("对外功能暂未开放");
        }
        $("#partName").html($groupname);
        
        /*打开我的、云筑圈、我的*/
        function openNewFrame(htmlName){
            var localData =  window.localStorage;
            window.location = htmlName+".html?mid="+localData.userNumber+"&groupid="+localData.groupId;
        }
      //获取投放广告
        function getaAd() {
        	var Post=basedata('adinfo')+"&adtype=2";
        	$.ajax({
        		url:'../../../api/getadimagebymidlist',
        		type:'post',
        		data:Post,
        		success:function(msg){
        			if(msg.code ==100){
//      				console.log(msg);
        				var len=msg.data.length;
        				var html="";
        				for(var i=0;i<len;i++){
//      					html+='<figure><div class="face faceInner"><img src="'+msg.data[i].n2+'" width="100%" height="100%" /></div></figure>';
        				html+="<figure><div class='face faceInner'><img src='"+msg.data[i].n2+"' width='100%' height='100%' onclick=\"openpageparam('../first_frame/adinfo.html','adid="+msg.data[i].n0+"')\" /></div></figure>";
        				}
        				var swipeWrap=$(".swipe-wrap");
        				swipeWrap.append(html);
        				initSlide();
        			}else{
        				refresh_failure();
        			}
        		}
        	});
        }
       
        //定制的图片轮播函数
        function initSlide() {
        	var bullets = document.getElementById('position').getElementsByTagName('li');
        	var slider=Swipe(document.getElementById('slider'), {
                    auto: 5000,
                    continuous: true,
                    disableScroll : true,
            		stopPropagation : true,
                    callback: function(pos) {
                        var i = bullets.length;
                        while(i--){
                            bullets[i].className = ' ';
                        }
                        bullets[pos].className = 'on';
                    }
                });
        }

		/*** 找团体找商机 找电商ajax, 11111团体，66666商机，77777电商***/
		var bodyParam=basedata('yunzo');	
		ajaxcocRequest("../../../api/group/gettopfiveinfolist",'post',bodyParam,function(msg){
			jQuery.each(msg.data,function(i,n){
				for(var j=0;j<msg.data.length;j++){
					if(msg.data[j].n0 == 11111){
						/*这是团体*/
//						console.log(msg.data[j]);
						var groupStr ="";
						for(var k = 0;k<msg.data[j].n1.length;k++){
							var imgId = msg.data[j].n1[k].n0;
							var imgUrl = msg.data[j].n1[k].n1;
							var title = msg.data[j].n1[k].n2;
							var rank = msg.data[j].n1[k].n3;
							if(imgUrl==""){
								imgUrl = "../../image/home/ecinfo/1.png";
							}
													
							groupStr +="<a class='link' onclick=\"showdetail("+imgId+")\">";
							groupStr +="<img src='"+imgUrl+"'></a>";							
						}

						$("#showTeamList").html(groupStr);

					}else if(msg.data[j].n0 == 66666){
						/*这是商机,数据库返回的img地址好多条啊！真的不是录入数据的问题？？*/
//						console.log(msg.data[j]);
						var busiStr ="";
						for(var k = 0;k<msg.data[j].n1.length;k++){
							var imgId = msg.data[j].n1[k].n0;
							var imgUrl = msg.data[j].n1[k].n1;
							var title = msg.data[j].n1[k].n2;
							var rank = msg.data[j].n1[k].n3;
							var imgUrlIndex = imgUrl.indexOf(",");
							if(imgUrl==""){
								imgUrl = "../../image/home/ecinfo/8.png";
							}							
//							console.log(imgurlindex);
							if(imgUrlIndex>0){
								imgUrl = imgUrl.substring(0,imgUrlIndex);
							}
							
							busiStr +="<a class='link' onclick=\"showdetail("+imgId+")\">";
							busiStr +="<img src='"+imgUrl+"'></a>";							
						}
						$("#showBusiOPPList").html(busiStr);
						
					}else if(msg.data[j].n0 ==77777){
						/*这是电商*/
						console.log(msg.data[j]);
						var eBusiStr = "";
						for(var k = 0;k<msg.data[j].n1.length;k++){
							var imgId = msg.data[j].n1[k].n0;
							var imgUrl = msg.data[j].n1[k].n1;
							var title = msg.data[j].n1[k].n2;
							var rank = msg.data[j].n1[k].n3;
							if(imgUrl==""){
								imgUrl = "../../image/home/ecinfo/hotel1.png";
							}
							eBusiStr +="<a class='link' onclick=\"showdetail("+imgId+")\">";
							eBusiStr +="<img src='"+imgUrl+"'></a>";			
						}
						/*如果数组长度不满足5条。另外再塞几条假数据*/
						if(msg.data[j].n1.length<5){
							for(var m = 0;m<(5-msg.data[j].n1.length);m++){
								eBusiStr +="<a class='link' onclick=\"showdetail()\">";
								eBusiStr +="<img src='../../image/home/ecinfo/hotel1.png'></a>";
							}							
						}
						
						$("#showEbusiList").html(eBusiStr);
					}
				}
				
			}); 
		});
    /*loading加载转圈*/
    sTart_Stop();
    </script>
</body>
</html>
